x86/vMSI-x: check whether msixtbl_list in msixtbl_pt_register()
authorChao Gao <chao.gao@intel.com>
Mon, 1 Aug 2016 16:22:54 +0000 (18:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 1 Aug 2016 16:22:54 +0000 (18:22 +0200)
commit6d61981d3619c6bad6134c2dac9774c00acca4fd
treedf432bb7f50e41ab57debf5a9b61ea33a98851bf
parentfeb7747be7fab49d929266e8b775ebb04198340a
x86/vMSI-x: check whether msixtbl_list in msixtbl_pt_register()

MSI-x tables' initializtion had been deferred in the commit
74c6dc2d0ac4dcab0c6243cdf6ed550c1532b798. If an assigned device does not support
MSI-x, the msixtbl_list won't be initialized. However, the following paths
    XEN_DOMCTL_bind_pt_irq
pt_irq_create_bind
    msixtbl_pt_register
do not check this case. Some errors(malwares, etc.) may lead to calling
XEN_DOMCTL_bind_pt_irq without a clear gtable and will cause Xen panic.

Signed-off-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/vmsi.c